package net.goutalk.glcs.module.qrct.controller;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.TypeReference;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.goutalk.glcs.common.annotation.GlcsLog;
import net.goutalk.glcs.common.constant.GlobalConstant;
import net.goutalk.glcs.common.model.result.R;
import net.goutalk.glcs.common.page.ConventPage;
import net.goutalk.glcs.common.page.PageOutput;
import net.goutalk.glcs.common.utils.VoToColumnUtil;
import net.goutalk.glcs.module.organization.dto.AddPostDto;
import net.goutalk.glcs.module.organization.dto.PostPageDto;
import net.goutalk.glcs.module.organization.dto.UpdatePostDto;
import net.goutalk.glcs.module.organization.entity.Post;
import net.goutalk.glcs.module.organization.entity.UserPostRelation;
import net.goutalk.glcs.module.organization.vo.PostPageVo;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;

/**
 * **************************************************************
 * 项目名称：
 * 程序名称：
 * 日期：
 * 作者： tanyuje
 * 模块：
 * 描述：
 * 备注：
 * ------------------------------------------------------------
 * 修改历史
 * 序号               日期              修改人       修改原因
 * <p>
 * 修改备注：
 *
 * @version **************************************************************
 */
@RestController
@RequestMapping(GlobalConstant.QRCT_MERCHANT_MODULE_PREFIX + "/goods")
@Api(value = GlobalConstant.QRCT_MERCHANT_MODULE_PREFIX + "/goods", tags = "商户商品")
public class GoodsMerchantController {
    @GetMapping(value = "/page")
    @ApiOperation(value = "商品列表(分页)")
    public R page(@Valid PostPageDto dto) {

        return R.ok();
    }
    @GetMapping(value = "/scan/info")
    @ApiOperation(value = "扫码根据id查询商品信息")
    public R info(@RequestParam String id) {
        return R.ok();
    }
    @PostMapping
    @ApiOperation(value = "新增商品")
    public R add(@Valid @RequestBody AddPostDto dto) {

        return R.ok(true);
    }
    @PutMapping
    @ApiOperation(value = "修改商品")
    public R update(@Valid @RequestBody UpdatePostDto dto) {

        return R.ok(true);
    }
    @DeleteMapping
    @ApiOperation(value = "删除")
    @GlcsLog(value = "删除商品")
    public R delete(@Valid @RequestBody List<Long> ids) {
        return R.ok(true);
    }
}
